<?php
if(basename($_SERVER['SCRIPT_NAME']) != "barangbukti.php") {
	header("Location:../../barangbukti.php");
	die();
}
?>


<div class="da-panel">
<div class="da-panel-header">
	<span class="da-panel-title">
		<i class="icon-circle-plus"></i> Tambah Foto Barang Bukti
	</span>
</div>

<div class="da-panel-content da-form-container">
<form id="da-dialog-add-val" class="da-form" enctype="multipart/form-data" method="post" action="modul/barangbukti/barangbukti.proses.php">
	<div id="da-validate-error" class="da-message error" style="display:none;"></div>
	<table class="da-table da-detail-view no-border">
		<tbody>
		<tr>
			<th>File Foto</th>
			<td>
				<input type="file" placeholder="Upload File" name="file">
			</td>
		</tr>
		</tbody>
	</table>
	<div class="btn-row">
		<a href="barangbukti.php" class="btn"><i class="icol-cross"></i> Batal</a>
		<button class="btn"><i class="icol-disk"></i> Upload</button>
		<input type="hidden" name="barangbukti" value="upload_gambar" />		
		<input type="hidden" name="kd_bb" value="<?php echo $_GET['foto']?>" />
	</div>
</form>
</div>

</div>


<div class="da-panel">
	<div class="da-panel-header">
		<span class="da-panel-title">
			<i class="icol-layout"></i>
			Foto-foto Barang Bukti
		</span>
	</div>
	<div class="da-panel-content with-padding">
		<div class="da-gallery prettyPhoto">
			<ul>
				<?php 					
					$q = mysql_query("SELECT * FROM t_bb_file a inner join t_bb b on a.kd_bb=b.kd_bb where a.kd_bb='$_GET[foto]'");
						while($dt = mysql_fetch_array($q)) {
							
				?>
						<li>
							<a href="<?php echo $dt['path_file']?>" rel="prettyPhoto[pp1]">
								<img src="<?php echo $dt['path_file']?>" alt="">
							</a>
						</li>
						
				<?php }	?>
			</ul>
		</div>
	</div>
</div>
